/*
 * QTXpost - a Qt-based blog client.
 * Copyright (C) 2010 Helen Sommer
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; version 3 of the License.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program (in COPYING); if not, write to the
 * Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
 * MA  02111-1307  USA
 *
 * The project is hosted on http://code.google.com/p/qtxpost
 */

#ifndef SERVER_CONFIG_H
#define SERVER_CONFIG_H

#include <QtCore>
#include <QtGui>
#include <QtSql>

#include "ui_ServerConfig.h"

class ServerConfig : public QDialog, private Ui::ServerConfig
{
  Q_OBJECT

    public:
  ServerConfig(QWidget *parent = 0);
  void initializeProgress();
  void initializeProgress(int count);
  void incrementProgress();
  void completeProgress();

 private:
  QButtonGroup *serversButtonGroup;
  QRadioButton *addNewAccount;
  QCursor currentCursor;
  int target, count;
  int step;
  int maxButtonGroupId;

  void reorderServers();
      
  private slots:
  void updateServer();
  int addServer();
  void toggleServer(int);
  void deleteServer();
  void hideServer(int);
  void forceUpdate(int);
  void updateIcons(int);
  void upServer();
  void downServer();
};

#endif
